﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace LadowarkaBaterii
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public  int[] dane_pomiarowe = new int[1000];
 
        private Bitmap bufor = null;

        private void RysujCharakterystyke(object sender, PaintEventArgs e)
        {            
            Graphics g = e.Graphics;
            bufor = new Bitmap(this.ClientSize.Width, this.ClientSize.Height);
            for (int x = 0; x < 50; x++) dane_pomiarowe[x] = 70 - x;
            for (int x = 50; x < 70; x++) dane_pomiarowe[x] = 20;
            int y=20;
            for (int x = 70; x < 200; x += 2)
            {
                y++;
                dane_pomiarowe[x] = y;
                dane_pomiarowe[x+1] = y;
            }
            //for (int x = 0; x < this.ClientSize.Width; x++)
            for (int x = 0; x < 200; x++)
            {

                bufor.SetPixel(x, dane_pomiarowe[x], Color.FromArgb(128, 128, 128));
            }
            g.DrawImage(bufor, 0, 0);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }


     
    }

}
